package com.data.reports.export.excel.handler;

import org.apache.commons.lang.StringUtils;
import org.springframework.web.multipart.MultipartFile;

/**
 * excel文件过滤器
 * Created by HuJiFang on 2017/11/15.
 */
public class ExcelFileFilter{

	public boolean accept(MultipartFile f) {
		return f != null && StringUtils.isNotBlank(f.getOriginalFilename()) && (StringUtils.endsWith(f.getOriginalFilename(), ".xls") || StringUtils.endsWith(f.getOriginalFilename(), ".xlsx"));
	}
}
